<template>
    <div class="withdraw">
    <!-- 表格 -->
      <el-table :data="withdraw">
      <el-table-column prop="id" label="编号" width="80" />
      <el-table-column prop="realname" label="员工名" />
      <el-table-column prop="telephone" label="手机号" />
      <el-table-column prop="idCard" label="身份证号码" />
      <el-table-column prop="bankCard" label="银行卡号" />
      <el-table-column prop="registerTime" label="注册时间" />
      <el-table-column label="操作" fixed="right">
        <template slot-scope="scope">
          <el-button type="primary" size="mini" @click="shenhe(scope.row)">提现</el-button>
        </template>
      </el-table-column>
     </el-table>
    <!-- /表格 -->
    <!-- 模态框 -->
    <el-dialog title="提现审核" :visible.sync="visible">
      <p>用户名：{{this.withd.realname}}</p>
       <p>身份证号：{{this.withd.idCard}}</p>
       <div>
           <P>身份证正面照片</P>
           <img  width="260" height="140" :src="this.withd.idPhotoPositive" alt=""/>
       <P>身份证背面照片</P>
           <img  width="260" height="140" :src="this.withd.idPhotoNegative" alt=""/>
       </div>
       <div slot="footer" class="dialog-footer">
           <el-button type="primary" @click="submit">提现通过</el-button>
           <el-button type="danger" @click="refuse">拒绝提现</el-button>
       </div>
       </el-dialog>
    <!-- /模态框 -->    
    </div>
</template>
<script>
import{ get } from "@/utils/request";
export default {
    data(){
        return{
            visible:false,
            withdraw:[],
            withd:[]
        }
    },
    created(){
        this.loadWithdraw();
    
        

    },
    methods:{
       loadWithdraw(){
            let url = "http://121.199.43.121:8090/user/find_all_employee";
            get(url).then(response =>{
                this.withdraw=response.data;
            })
        },
        shenhe(row){
            this.withd = row;
            this.visible = true;
        },
       submit(){
            // let url = "http://121.199.43.121:8090/user/auditing";
            //     get(url,{id:this.withd.id}).then(response=>{
            //         this.$message({type:"success",message:response.message});
            //         this.loadWithdraw();
            //     })
                this.visible = false;
        },
        refuse(){
            // let url = "http://121.199.43.121:8090/user/refuse_auditing";
            //     get(url,{id:this.withd.id}).then(response=>{
            //         this.$message({type:"success",message:response.message});
            //         this.loadWithdraw();
            //     })
                this.visible = false;
        }
    }
    
}
</script>